#include "strutil.h"
#include <windows.h>

_tstring makelength(_tstring x, int y)
{
	if((int)x.length() > y)
	{
		x = x.substr(0,y-4);
		x += L"... ";
		return x;
	}
	else
	{
		int i = 0;
		for(i = 0;i<(y - (int)x.length());i++)
		{
			x += L" ";
		}
		return x;
	}
}
bool isalpha(string x)
{
	if((x[0] >= 65 && x[0] <= 90) || (x[0] >= 97 && x[0] <= 122))
		return true;
	return false;
}

void error(_tstring x)
{
	MessageBox(NULL,x.c_str(),0,0);
}

void stringswap(std::vector<_tstring>& arr, int i, int j)
{
	_tstring temp = arr[i];
	arr[i] = arr[j];
	arr[j] = temp;
}
